package com.jackson.javadesignmodel.FactoryAndStrategy.strategy.impl;

/*
 * Author: JacksonCoder
 * FileName: SvipStrategy
 * Version: 1.0.0
 * Date: 2025-09-22
 */

import com.jackson.javadesignmodel.FactoryAndStrategy.strategy.DiscountStrategy;

import java.math.BigDecimal;
import java.math.RoundingMode;

public class SvipStrategy implements DiscountStrategy {

    @Override
    public BigDecimal apply(BigDecimal origin) {
        return origin.multiply(BigDecimal.valueOf(0.8))
                .setScale(2, RoundingMode.HALF_UP);
    }
}
